bebb04bdeaec4261dbbda8427a7a7a230cee254f,bukkit/src/main/java/com/github/games647/fastlogin/bukkit/commands/CrackedCommand.java,CrackedCommand,onCrackedOther,#CommandSender#Command#String[]#,59

Before Change



    private void onCrackedOther(CommandSender sender, Command command, String[] args) {
        if (!sender.hasPermission(command.getPermission() + ".other")) {
            sender.sendMessage(plugin.getCore().getMessage("no-permission"));
            return;
        }
        
        if (plugin.isBungeeCord()) {
            plugin.sendBungeeActivateMessage(sender, args[0], false);
            String message = plugin.getCore().getMessage("wait-on-proxy");
            if (message != null) {
                sender.sendMessage(message);
            }
        } else {
            //todo: load async
            PlayerProfile profile = plugin.getCore().getStorage().loadProfile(args[0]);
            if (profile == null) {
                sender.sendMessage("Error occured");
                return;
            }

            //existing player is already cracked
            if (profile.getUserId() != -1 && !profile.isPremium()) {
                sender.sendMessage(plugin.getCore().getMessage("not-premium-other"));
            } else {
                sender.sendMessage(plugin.getCore().getMessage("remove-premium"));
                profile.setPremium(false);
                Bukkit.getScheduler().runTaskAsynchronously(plugin, () -> {
                    plugin.getCore().getStorage().save(profile);

After Change



    private void onCrackedOther(CommandSender sender, Command command, String[] args) {
        if (!sender.hasPermission(command.getPermission() + ".other")) {
            plugin.getCore().sendLocaleMessage("no-permission", sender);
            return;
        }
        
        if (plugin.isBungeeCord()) {
            plugin.sendBungeeActivateMessage(sender, args[0], false);
            plugin.getCore().sendLocaleMessage("wait-on-proxy", sender);
        } else {
            //todo: load async
            PlayerProfile profile = plugin.getCore().getStorage().loadProfile(args[0]);
            if (profile == null) {
                sender.sendMessage("Error occured");
                return;
            }

            //existing player is already cracked
            if (profile.getUserId() != -1 && !profile.isPremium()) {
                plugin.getCore().sendLocaleMessage("not-premium-other", sender);
            } else {
                plugin.getCore().sendLocaleMessage("remove-premium", sender);

                profile.setPremium(false);
                Bukkit.getScheduler().runTaskAsynchronously(plugin, () -> {